﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using l1cs.server.model.Instance;

namespace l1cs.server.serverpackets
{
    public class S_CharPacks : ServerBasePacket
    {
        private static Logger _log = Logger.getLogger( typeof( S_CharPacks ).FullName );

        public S_CharPacks( String name, String clanName, int type, int sex,
                int lawful, int hp, int mp, int ac, int lv, int str, int dex,
                int con, int wis, int cha, int intel, int accessLevel )
        {
            writeC( Opcodes.S_OPCODE_CHARLIST );
            writeS( name );
            writeS( clanName );
            writeC( type );
            writeC( sex );
            writeH( lawful );
            writeH( hp );
            writeH( mp );
            writeC( ac );
            writeC( lv );
            writeC( str );
            writeC( dex );
            writeC( con );
            writeC( wis );
            writeC( cha );
            writeC( intel );

            // is Administrator
            // 0 = false
            // 1 = true , can't attack
            // > 1 true , can't attack
            // can use Public GameMaster Command
            // if (accessLevel == 200) {
            // writeC(1);
            // } else {
            writeC( 0 );
            // }
        }

        override
        public byte[] getContent()
        {
            return _bao.ToArray();
        }

        override
        public String getType()
        {
            return "[S] S_CharPacks";
        }
    }
}